package com.log.demo.code.controller;

import com.log.demo.code.utils.ResultMessage;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;

@RestController
@Slf4j
public class HelloWorldController {

    @GetMapping("/getOne")
    public ResultMessage getOne(String name){
        log.info("#########  info  #########"+name);
        log.debug("#########  debug  #########"+name);
        log.error("#########  error  #########"+name);
        Map<String,Object> map = new HashMap<>();
        map.put("result","返回值");
        return new ResultMessage(map);
    }
}
